//
//  OnlineShoppingDetailsViewController.m
//  NewApp
//
//  Created by  on 12-7-9.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "OnlineShoppingDetailsViewController.h"
#import "OnlineShoppingInfoViewController.h"
#import "OnlineShoppingSearchResultViewController.h"

@interface OnlineShoppingDetailsViewController ()

@end

@implementation OnlineShoppingDetailsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
}

- (void) dealloc {
    [super dealloc];
}

- (void) loadRequest {
    [self.engine onlineShoppingDetailsWithCategoryID:self.category.sID keyword:@"" page:1];
}

- (void) viewDetailsWithID:(NSString *)aID {
    self.title = @"返回";
    OnlineShoppingInfoViewController *viewCtrl = [[OnlineShoppingInfoViewController alloc] init];
    viewCtrl.ID = aID;
    [self.navigationController pushViewController:viewCtrl animated:YES];
    [viewCtrl release];
}

- (void) searchButtonDidPressed {
    if (_searchBar.keywordTextfield.text.length == 0) 
        return;
    self.title = @"返回";
    OnlineShoppingSearchResultViewController *viewCtrl = [[OnlineShoppingSearchResultViewController alloc] initWithID:self.category.sID keyword:_searchBar.keywordTextfield.text];
    [self.navigationController pushViewController:viewCtrl animated:YES];
    [viewCtrl release];
}


@end
